"""
Author        yongfa
Date          2022-07-18 15:01:02
LastEditTime  2022-07-18 15:29:04
LastEditors   yongfa
Description   请求参数
"""


from flask_restx import reqparse
from werkzeug.datastructures import FileStorage

from app.extensions.utils.validator import split_int_list
from app.extensions.utils.parameters import page_params


get_list_params = page_params.copy()
get_list_params.add_argument('module_name', type=str, location='args', help='模块名')
get_list_params.add_argument('name', type=str, location='args', help='名称')


create_params = reqparse.RequestParser()
create_params.add_argument('module_name', type=str, default='default', location='form', help='模块名(文件归类模块名称)')
create_params.add_argument('file', type=FileStorage, required=True, location='files', help='文件')


delete_params = reqparse.RequestParser()
delete_params.add_argument('file_ids', type=split_int_list, location='json', help='文件id,eg:1,2,3')
